#include "Blip.h"

//Default Blip constructor
Blip::Blip() {
	m_fpnt.x = 0;
	m_fpnt.y = 0;
	m_velx = Velocity( 0.0, Acceleration(0,0,1), 2 );
	m_vely = Velocity( 0.0, Acceleration(0,0,1), 2 );
}

//Blip copy constructor
Blip::Blip( const Blip & copy )
	: m_fpnt( copy.m_fpnt ), m_velx( copy.m_velx ), m_vely( copy.m_vely ) { }

//Blip full constructor
Blip::Blip( FPOINT pnt, Velocity velx, Velocity vely)
	: m_fpnt( pnt ), m_velx( velx ), m_vely( vely ) { }

//Blip full constructor
Blip::Blip( float pntX, float pntY, Velocity velx, Velocity vely) {
	m_velx = velx;
	m_vely = vely;
	m_fpnt.x = pntX;
	m_fpnt.y = pntY;
}

//Blip destructor
Blip::~Blip() {
}

//Sets Point for Blip
void Blip::SetPoint( FPOINT pnt ) {
	m_fpnt.x = pnt.x;
	m_fpnt.y = pnt.y;
}

//Sets Velocity in X space for Blip
void Blip::SetVelocityX( Velocity velx ) {
	m_velx = velx;
}

//Sets Velocity in Y space for Blip
void Blip::SetVelocityY( Velocity vely ) {
	m_vely = vely;
}

//Sets X Velocity's Acceleration
void Blip::SetAccelerationX ( Acceleration accX ) {
	m_velx.SetAccel ( accX );
}

//Sets Y Velocity's Acceleration
void Blip::SetAccelerationY ( Acceleration accY ) {
	m_vely.SetAccel ( accY );
}

void Blip::Tick() {
	m_fpnt.x += m_velx.Tick();
	m_fpnt.y += m_vely.Tick();
}

//Gets X Velocity
Velocity Blip::GetVelocityX() {
	return m_velx;
}

//Gets Y Velocity
Velocity Blip::GetVelocityY() {
	return m_vely;
}

//Gets Blip's current Point
FPOINT Blip::GetPoint() {
	return m_fpnt;
}